#include "ClassMetaManager.h"



_NS_OOP_BEGIN



ClassMetaManager::ClassMetaManager ()
{
}



void
ClassMetaManager::registerClass (Object::Meta& meta)
{
	_map_className_meta[meta.className] = meta;
}



QMap< QString, Object::Meta >&
ClassMetaManager::getClassName2MetaMap ()
{
	return _map_className_meta;
}



Object::Meta&
ClassMetaManager::getMeta (QString& r_className)
throw (ClassMetaNotFoundException)
{
	auto findResult = _map_className_meta.find (r_className);
	if (findResult == _map_className_meta.end ())
		OOPTHROW (ClassMetaNotFoundException (r_className));
	return findResult.value ();
}



_NS_OOP_END